]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
subprojects/shew: Adjust to GTK deprecation
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 27 May 2023 13:00:43 +0000 (15:00 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 19 Jun 2023 23:25:12 +0000 (23:25 +0000)
GTK 4.12 deprecates gdk_wayland_toplevel_unexport_handle() in favor
of the new gdk_wayland_toplevel_drop_exported_handle(). We are not
bound by API stability, so we can just expose the additional argument
that the replacement requires instead of tracking the handle
internally.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2778>

subprojects/shew/src/shew-window-exporter.c
subprojects/shew/src/shew-window-exporter.h

index ab84bf8a95f71b146cd03a2b67322d754200c542..0e338dc2dd10661f02d87cebd222bb2edfc74717 100644 (file)
@@ -126,7 +126,8 @@ shew_window_exporter_export_finish (ShewWindowExporter  *exporter,
 }
 
 void
-shew_window_exporter_unexport (ShewWindowExporter *exporter)
+shew_window_exporter_unexport (ShewWindowExporter *exporter,
+                               const char         *handle)
 {
   GtkWidget *widget;
 
@@ -138,7 +139,11 @@ shew_window_exporter_unexport (ShewWindowExporter *exporter)
   if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (widget)))
     {
       GdkSurface *s = gtk_native_get_surface (GTK_NATIVE (widget));
+#if GTK_CHECK_VERSION (4, 11, 3)
+      gdk_wayland_toplevel_drop_exported_handle (GDK_WAYLAND_TOPLEVEL (s), handle);
+#else
       gdk_wayland_toplevel_unexport_handle (GDK_WAYLAND_TOPLEVEL (s));
+#endif
     }
 #endif
 }
index 224fff52f948e5f6a982131e5e57cd448454a3cf..e449fa3be29683f98f6768674efb90351eb3f5a8 100644 (file)
@@ -35,4 +35,5 @@ char *shew_window_exporter_export_finish (ShewWindowExporter  *exporter,
                                           GAsyncResult        *result,
                                           GError             **error);
 
-void shew_window_exporter_unexport (ShewWindowExporter *exporter);
+void shew_window_exporter_unexport (ShewWindowExporter *exporter,
+                                    const char         *handle);